首页 \ 问答 \ 流程状态 - 阻塞状态(Process states - blocked state)

流程状态 - 阻塞状态(Process states - blocked state)

我想知道即使没有任何其他进程想要运行,进程是否仍然处于阻塞状态。 Theroticaly我猜答案是肯定的,但实际上它不是..我是对的?


I wonder if process could stay in blocked state even if there is not any other process that want to run. Theroticaly i guess the answer is yes ,but in practically it is not .. i'm right ?


原文:https://stackoverflow.com/questions/41682942
更新时间:2023-03-27 14:03

最满意答案

我刚刚在这里针对不同的productFlavors回答了类似的问题。

在你的情况下它是调试/生产。 我不知道为什么你需要在生产和调试之间切换,但我认为你可以像我提出的口味一样。

创建两个额外的文件夹src/releasesrc/debug ,在每个文件夹中放置相应的google-services.json ,这样你就可以: src/release/google-services.jsonsrc/debug/google-services.json

现在在gradle添加这个:

android {

// set build config here to get the right gcm configuration.
//def myBuildConfig = "release"
def myBuildConfig = "debug"

// this will copy the right google-services.json file to app/ directory.
if (myBuildConfig.equals("release")) {
    println "--> release copy!"
    copy {
        from 'src/release/'
        include '*.json'
        into '.'
    }
} else {
    println "--> debug copy!"
    copy {
        from 'src/debug/'
        include '*.json'
        into '.'
    }
}

// other stuff
}

I have just answered a similar question here for different productFlavors.

In your case it's debug/production. I don't know why you need to switch between production and debug but i think you can do the same as what I proposed for flavors.

Create two extra folders src/release and src/debug , in each of the folders you put the corresponding google-services.json , so you will have: src/release/google-services.json and src/debug/google-services.json

Now in gradle add this :

android {

// set build config here to get the right gcm configuration.
//def myBuildConfig = "release"
def myBuildConfig = "debug"

// this will copy the right google-services.json file to app/ directory.
if (myBuildConfig.equals("release")) {
    println "--> release copy!"
    copy {
        from 'src/release/'
        include '*.json'
        into '.'
    }
} else {
    println "--> debug copy!"
    copy {
        from 'src/debug/'
        include '*.json'
        into '.'
    }
}

// other stuff
}

相关问答

更多
  • 我刚刚在这里针对不同的productFlavors回答了类似的问题。 在你的情况下它是调试/生产。 我不知道为什么你需要在生产和调试之间切换,但我认为你可以像我提出的口味一样。 创建两个额外的文件夹src/release和src/debug ,在每个文件夹中放置相应的google-services.json ,这样你就可以: src/release/google-services.json和src/debug/google-services.json 现在在gradle添加这个: android { // ...
  • 不,你没有。 在gcm中,您只需要来自api控制台的Api id。 在你的api控制台中,它叫做Project Number。 No, you don't. In gcm you only need the Api id from api console. In your api console its called Project Number.
  • 除了您认为的两个选项外,还有另一种方法: 从development创建分支temp (与development相同的用法)供客户端使用。 将你工作的分支合并到temp 。 客户批准部分分支机构后,您可以将这些已批准的分支机构合并到development ,然后将development合并到production 。 Except the two options you thought, there have another way: Create a branch temp from development ...
  • 这里的思维过程是大部分时间花在development 。 在开发中,您创建一个feature分支(脱离development ),完成该功能,然后合并回development 。 然后可以通过合并到production中将其添加到最终生产版本。 有关此方法的更多细节,请参阅成功的Git分支模型 。 The thought process here is that you spend most of your time in development. When in development, you crea ...
  • 这就是它应该出现的方式 - 用于开发的“可配置”和用于分发的“启用”。 但它也适用于开发。 That's how it should appear - "Configurable" for development and "Enabled" for distribution. But it'll work for development as well.
  • 有两个与WAMP一起打包的php.ini文件: php.ini-development和php.ini-production 。 它们预先配置了开发或生产的通用设置。 无论你重命名为php.ini是哪一个都将被使用。 如果您只想打开错误报告,您可以通过单击系统托盘中的WAMP图标并选择PHP > php.ini来编辑您当前使用的任何php.ini文件。 这将在文本编辑器中打开文件,您可以在其中更改所需的任何配置,包括: error_reporting = E_ALL & ~E_NOTICE 在线和文件中有 ...
  • 您注册到GCM并在客户端从GCM取消注册。 这就是您从Google获得注册ID的地方。 一旦您拥有注册ID,您应该认为它有效,直到: 您将带有注册ID的邮件发送到Google的GCM服务器,并收到NotRegistered或InvalidRegistration错误。 在这些情况下,您应该从数据库中删除注册ID。 您将带有注册ID的消息发送到Google的GCM服务器并获得成功的响应,但响应包含规范的注册ID。 在这种情况下,您应该使用规范注册ID替换注册ID。 该应用程序明确地从GCM取消注册,并通知服务 ...
  • 我们不需要担心TCP连接,因为它由GCM服务器,我们的应用服务器和Google Play服务处理 我们收到消息因为我们有BroadcastReceiver 见下面的解释 推送通知允许您的应用程序通知用户新消息或事件,即使用户没有主动使用您的应用程序。 在Android设备上,当设备收到push notification ,应用程序的图标和消息将显示在状态栏中。 有关完整的GCM教程,请参阅本教程 We don't need to worry about TCP connection because that ...
  • 在C2DM 文档中 ,该服务已于2012年6月26日正式弃用。这意味着C2DM已停止接受新用户和配额请求。 。 根据这一点,我假设GCM现在正在运行,并且鼓励开发人员从C2DM迁移到GCM。 “开发人员必须使用GCM进行新的开发。” It's official at C2DM documentation that the service has been officially deprecated as of June 26, 2012. This means that C2DM has stopped a ...
  • 如果您的目的是为每个环境生成不同的可交付成果,那么可行的解决方案就是使用Maven配置文件。 http://maven.apache.org/guides/introduction/introduction-to-profiles.html 如果您为每个配置文件定义不同的配置文件,例如'AVE','UAT','NFT'等等,您可以使用指定的配置文件调用Maven,以生成您需要的应用程序 mvn clean deploy -P AVE mvn clean deploy -P UAT 等等 如果您不想保留* ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)